import java.util.ArrayList;
import java.util.List;

public class StudentManager {
    private List<Student> students = new ArrayList<>();

    // 记录学生成绩
    public void addStudent(String courseName, double score) {
        students.add(new Student(courseName, score));
    }

    // 查询学生成绩
    public void queryScores(String courseName) {
        System.out.println("课程：" + courseName);
        for (Student s : students) {
            if (s.getCourseName().equals(courseName)) {
                System.out.println("学生成绩：" + s.getScore());
            }
        }
    }

    static class Student {
        private String courseName;
        private double score;

        public Student(String courseName, double score) {
            this.courseName = courseName;
            this.score = score;
        }

        public String getCourseName() { return courseName; }
        public double getScore() { return score; }
    }
}